/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package carcassonne.gameplay.listObjects;

import java.util.ArrayList;
import java.util.List;

/**
 * Contains a list of all the positions that are occupied by tiles.
 * 
 * @author tylerb
 */
public class OccupiedPositions {
    private static List <Integer> occupiedPositions = new ArrayList();

    public static void initialize(int boardSize) {
        for(int i=0; i<=boardSize; i++) {
            occupiedPositions.clear();
        }
    }
    
    public static List getOccupiedPositionsList() {
        return occupiedPositions;
    }
    
    public static void addPosition(int position) {
        occupiedPositions.add(position);
    } 
    
    public static void removePosition(int position) {
        occupiedPositions.remove((Integer) position);
    }
    
    public static Boolean containsPosition(int position) {
        return occupiedPositions.contains((Integer) position);
    }

}
